<?php
// +----------------------------------------------------------------------
// |运费管理控制器
// +----------------------------------------------------------------------


namespace app\Api\controller;

use app\BaseController;
use think\facade\Db;
use app\Api\system\GetShippingService;
use think\facade\Request;

class GetShipping extends BaseController
{
  //dh.shipping.templates.get$1.0 (卖家获取运费模版列表接口)
  public function getTemplates(){
    $shop_id= Request::get("shop_id");
    if(empty($shop_id)){
      return json(['code' => 0,'msg' => '缺少shop_id参数']);
    }
     $accessToken=$this->getTokenByCode($shop_id);     
     $result=GetShippingService::getTemplates($accessToken,$shop_id);
     return json($result);
  }
    
}